package com.ruoyi.financial.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.financial.mapper.FOutOrderMapper;
import com.ruoyi.financial.domain.FOutOrder;
import com.ruoyi.financial.service.IFOutOrderService;

/**
 * 出单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-07
 */
@Service
public class FOutOrderServiceImpl implements IFOutOrderService 
{
    @Autowired
    private FOutOrderMapper fOutOrderMapper;

    /**
     * 查询出单
     * 
     * @param id 出单主键
     * @return 出单
     */
    @Override
    public FOutOrder selectFOutOrderById(Long id)
    {
        return fOutOrderMapper.selectFOutOrderById(id);
    }

    /**
     * 查询出单列表
     * 
     * @param fOutOrder 出单
     * @return 出单
     */
    @Override
    public List<FOutOrder> selectFOutOrderList(FOutOrder fOutOrder)
    {
        return fOutOrderMapper.selectFOutOrderList(fOutOrder);
    }

    /**
     * 新增出单
     * 
     * @param fOutOrder 出单
     * @return 结果
     */
    @Override
    public int insertFOutOrder(FOutOrder fOutOrder)
    {
        fOutOrder.setCreateTime(DateUtils.getNowDate());
        return fOutOrderMapper.insertFOutOrder(fOutOrder);
    }

    /**
     * 修改出单
     * 
     * @param fOutOrder 出单
     * @return 结果
     */
    @Override
    public int updateFOutOrder(FOutOrder fOutOrder)
    {
        fOutOrder.setUpdateTime(DateUtils.getNowDate());
        return fOutOrderMapper.updateFOutOrder(fOutOrder);
    }

    /**
     * 批量删除出单
     * 
     * @param ids 需要删除的出单主键
     * @return 结果
     */
    @Override
    public int deleteFOutOrderByIds(Long[] ids)
    {
        return fOutOrderMapper.deleteFOutOrderByIds(ids);
    }

    /**
     * 删除出单信息
     * 
     * @param id 出单主键
     * @return 结果
     */
    @Override
    public int deleteFOutOrderById(Long id)
    {
        return fOutOrderMapper.deleteFOutOrderById(id);
    }
}
